package cc.md888.app.infr.dao.impl;

import cc.md888.app.domain.entity.User;
import cc.md888.app.infr.dao.mapper.UserMapper;
import cc.md888.app.infr.dao.UserDao;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 用户 服务实现类
 * </p>
 *
 * @author maodou
 * @since 2025-09-13 14:22:44
 */
@Service
public class UserDaoImpl extends ServiceImpl<UserMapper, User> implements UserDao {

    @Override
    public User getByEmail(String email) {
        return getOne(
                Wrappers.<User>query().eq(User.EMAIL, email)
        );
    }
}
